Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ClimaTimeSteppers in implicit hydro balance example #1375

Closed
wants to merge 1 commit into from

Conversation

charleskawczynski
Copy link
Member

This PR changes the implicit hydro balance example to use ClimaTimeSteppers.

This is a peel off from #1358.

This will technically have behavior changes because we're switching from Rosenbrock23 to ARS343

@charleskawczynski
Copy link
Member Author

bors try

bors bot added a commit that referenced this pull request Jul 14, 2023
@bors
Copy link
Contributor

bors bot commented Jul 14, 2023

try

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@charleskawczynski charleskawczynski marked this pull request as draft July 14, 2023 23:20
@charleskawczynski charleskawczynski removed the request for review from simonbyrne July 14, 2023 23:20
@charleskawczynski
Copy link
Member Author

This is actually breaking (we're using soft_fail on this job)

@charleskawczynski
Copy link
Member Author

@dennisYatunin, any suggestion on what to do here? What's the nearest neighbor change?

@dennisYatunin
Copy link
Member

Ah, yes, I think passing Wfact = Wfact! to the ODEFunction should fix your error.

@charleskawczynski
Copy link
Member Author

bors try

bors bot added a commit that referenced this pull request Jul 17, 2023
@bors
Copy link
Contributor

bors bot commented Jul 17, 2023

try

Build failed:

@dennisYatunin
Copy link
Member

Oh, sorry, I was looking at the ClimaAtmos code. In this file, it would be Wfact = jacobian!. The jac = jacobian! is not used by ClimaTimeSteppers (because the thing we're actually specifying here is I - dt * gamma * J, rather than J itself).

@dennisYatunin
Copy link
Member

Actually, looking more closely at this, I don't think that will work. The jacobian!(J, Y, p, t) function needs to be rewritten as a Wfact!(W, Y, p, dtγ, t) function (so J needs to be replaced with I - dtγ * J), and then linsolve! needs to be modified to solve A * x = b, where A = I - dtγ * J, instead of whatever it's solving now.

@charleskawczynski
Copy link
Member Author

Superseded by #1400

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants